// Vertex coordinates（a cuboid 3.0 in width, 10.0 in height, and 3.0 in length with its origin at the center of its bottom)
const vertices = new Float32Array(
    [
        [0.5, 1.0, 0.5, -0.5, 1.0, 0.5, -0.5, 0.0, 0.5, 0.5, 0.0, 0.5], // v0-v1-v2-v3 front
        [0.5, 1.0, 0.5, 0.5, 0.0, 0.5, 0.5, 0.0, -0.5, 0.5, 1.0, -0.5], // v0-v3-v4-v5 right
        [0.5, 1.0, 0.5, 0.5, 1.0, -0.5, -0.5, 1.0, -0.5, -0.5, 1.0, 0.5], // v0-v5-v6-v1 up
        [-0.5, 1.0, 0.5, -0.5, 1.0, -0.5, -0.5, 0.0, -0.5, -0.5, 0.0, 0.5], // v1-v6-v7-v2 left
        [-0.5, 0.0, -0.5, 0.5, 0.0, -0.5, 0.5, 0.0, 0.5, -0.5, 0.0, 0.5], // v7-v4-v3-v2 down
        [0.5, 0.0, -0.5, -0.5, 0.0, -0.5, -0.5, 1.0, -0.5, 0.5, 1.0, -0.5], // v4-v7-v6-v5 back
    ].flat(),
);

// Normal
const normals = new Float32Array(
    [
        [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0], // v0-v1-v2-v3 front
        [1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0], // v0-v3-v4-v5 right
        [0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0], // v0-v5-v6-v1 up
        [-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0], // v1-v6-v7-v2 left
        [0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0], // v7-v4-v3-v2 down
        [0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0], // v4-v7-v6-v5 back
    ].flat(),
);

// Indices of the vertices
const indices = new Uint8Array(
    [
        [0, 1, 2, 0, 2, 3], // front
        [4, 5, 6, 4, 6, 7], // right
        [8, 9, 10, 8, 10, 11], // up
        [12, 13, 14, 12, 14, 15], // left
        [16, 17, 18, 16, 18, 19], // down
        [20, 21, 22, 20, 22, 23], // back
    ].flat(),
);

export {
    //
    vertices,
    normals,
    indices,
};
